package com.zsk.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Administrator
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("登录令牌实体")
@TableName("shop_token_info")
public class TokenInfo implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("自增主键")
    private Long id;

    @ApiModelProperty("业务主键")
    private String tokenNo;

    @ApiModelProperty("token令牌")
    private String token;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("是否是管理员账号")
    private Boolean isGop;

    @ApiModelProperty("是否失效 0未失效1已失效")
    private Boolean invalid;

    @ApiModelProperty("当前时间超过该时间也属于失效，规则生成时间+day")
    private Date invalidDate;

    @ApiModelProperty("生成时间")
    private Date createTime;

    @ApiModelProperty("修改时间")
    private Date updateTime;

    private static final long serialVersionUID = 1L;
}